package com.sanshow.charging.data;

import com.blankj.utilcode.util.StringUtils;
import com.sanshow.charging.util.AppInfoUtils;
import com.sanshow.charging.util.ConstUtil;
import com.sanshow.charging.util.StringUtil;


public class NowVersionBean extends DefaultSendBean {

    public NowVersionBean() {

        String versionCode = Integer.toHexString(AppInfoUtils.getVersionCode());
        if(StringUtils.isEmpty(versionCode)){
            versionCode = "00";
        }else{
            int vCode = AppInfoUtils.getVersionCode();
            if (9 < vCode && vCode <= 15) {
                versionCode = "0" + Integer.toHexString(vCode);
            }
        }

        StringBuilder message = new StringBuilder();
        message.append("61");
        message.append("00");
        message.append("00000000");
        message.append("A9");
        message.append("00");
        message.append("A1");
        message.append("00");
        message.append("00");
        message.append("00");
        message.append("00");
        message.append("00");
        message.append("00");
        message.append("00");
        message.append("00");
        message.append(versionCode);
        message.append("DF");
        message.append("DF");

        content = message.toString();
    }


}
